/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1632111171422_6113';
  config.security = {
    csrf: {
      ignore: '/wechat',
    },
  }
  // add your middleware config here
  config.middleware = [];
  // 天气接口配置
  config.weather = {
    appid: '42224277',
    appsecret: 'g8NO3Y6X',
    city: ['赣州', '广州', '长沙']
    // city: ['广州', '福州']
  };
  // 测试 微信公众号
  config.weChat = {
    appld: 'wxdd0b9073b89ca26d',
    secret: '8997edb77e38725b231a7a8ccd12342b',
    token: 'linhuibin98',
    // 用户的openid
    users: [
      'oxbau6rWeP0RiKPuX69FoK8W2fAM',
      'oxbau6ooR9xDd36JOL6RKfpLuvek',
    ],
    daily: 'UkwLGy7IoFinytKefBI1hUo5wNraXuvY6PqSZskNX70', // 普通模板
    marry: 'vgiDziFYNdkYtBYLjQ2BTgtbDlWyh4QiTZxrtkeOoJA', // 结婚纪念日模板
    wageDay: 'BuK7Ik-0ydObJ5yeXplnoNBVnjTC3xf_47Noy6zzVMc', // 工资日模板
    birthday: 't_0bj6ITqJp9fb6fgFBVxEZqwZJc1ndnj8Q5YYecS84', // 生日模板
    normal: 'CTkzcTvEB3dnROk5RNlAizFzW6a-xuh39BgJIKgCFeA', // 正常文字模板
  };

  // 时间
  config.time = {
    wageDay: 15, // 工资日
    love: '2020-01-30', // 相爱日期
    marry: '2020-01-30', // 结婚纪念日
    // 生日配置
    // 老家过阴历生日，这里暂时写死
    birthdayGirl: {
      2021: '2021-01-06',
      2022: '2022-01-06',
      2023: '2023-01-06',
      2024: '2024-01-06',
      2025: '2025-01-06',
      2026: '2026-01-06',
    },
    birthdayBoy: {
      2021: '2021-01-06',
      2022: '2022-04-01',
      2023: '2023-04-20',
      2024: '2024-04-09',
      2025: '2025-03-29',
      2026: '2026-04-17',
    }, 
    // 每年生日 阳历
    birthYear: 1997,
    draduation: '2022-06-10', // 毕业时间
  };
  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  return {
    ...config,
    ...userConfig,
  };
};
